import request from "./request";

export class LoginApi {
    loginByPhone({phone, passwd}) {
        let data = {phone, passwd}
        return request({url: '/api/v1/login/pwd/org', method: 'post', data})
    }

    loginByCode({phone, code}) {
        let data = {phone, code}
        return request({url: '/api/v1/login/smsLogin/org', method: 'post', data})
    }

    sendPhoneCode(phone) {
        let data = {phone, name: 'login', client: 'O'}
        return request({url: '/api/v1/send_sms', method: 'post', data})
    }
}
